//
//  HomeSportCell.swift
//  FlameB
//
//  Created by 连俊 on 2020/8/4.
//  Copyright © 2020 连俊. All rights reserved.
//

import UIKit

class HomeSportCell: UITableViewCell {
    static let CellHeight: CGFloat = 50
    static let reuseid: String = "HomeSportCell"
    
    lazy var titleLabel: UILabel = {
        let label = UILabel()
        label.textColor = UIColor.black
        label.font = UIFont.boldSystemFont(ofSize: 18)
        return label
    }()
    
    var titleString: String = "" {
        didSet {
            titleLabel.text = titleString
        }
    }
    
    override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) {
        super.init(style: style, reuseIdentifier: reuseIdentifier)
        contentView.addSubview(titleLabel)
        titleLabel.snp.makeConstraints { (make) in
            make.top.equalToSuperview().offset(15)
            make.left.equalToSuperview().offset(10)
            make.height.equalTo(20)
            make.right.equalToSuperview().offset(-10)
        }
        
        let sepView = UIView()
        sepView.backgroundColor = UIColor.init(rgb: 0xF7F7F7)
        contentView.addSubview(sepView)
        sepView.snp.makeConstraints { (make) in
            make.top.equalTo(titleLabel.snp.bottom).offset(20)
            make.left.equalToSuperview().offset(10)
            make.right.equalToSuperview()
            make.height.equalTo(2/UIScreen.main.scale)
            make.bottom.equalToSuperview().priority(999)
        }
    }
    
    required init?(coder: NSCoder) {
        fatalError("init(coder:) has not been implemented")
    }
}
